# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mkfontscale
pkgver=1.2.1
pkgrel=1
pkgdesc="Scalable font index generator for X"
url="http://xorg.freedesktop.org"
arch="all"
license="MIT"
options="!check"  # No test suite.
subpackages="$pkgname-doc"
makedepends="freetype-dev libfontenc-dev util-macros xorgproto zlib-dev"
triggers="$pkgname.trigger=/usr/share/fonts/*"
source="https://www.x.org/releases/individual/app/$pkgname-$pkgver.tar.bz2"
replaces="mkfontdir"
provides="mkfontdir"

builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="4d243160e1f7f8dfa6a8f53349c1a42a55fc99426455ebdef58352c5e951fce8b4f1fbd1061a76c9a148095b002eac372db1ae5e2647d2ccb4886635b317b18c  mkfontscale-1.2.1.tar.bz2"
